import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
//登录
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/HuiYuan/Login.vue'),
    },
//首页（等级权限）
    {
      path: '/',
      name: 'index',
      component: () => import('../views/DengJi/Index.vue'),
    },
//会员添加
    {
      path: '/addhy',
      name: 'addhy',
      component: () => import('../views/HuiYuan/AddHy.vue'),
    },
//等级显示
    {
      path: '/showdj',
      name: 'showdj',
      component: () => import('../views/DengJi/Showdj.vue'),
    },
//权益显示
    {
      path: '/showqy',
      name: 'showqy',
      component: () => import('../views/QuanYi/Showqy.vue'),
    },

    //会员显示
    {
      path: '/showhy',
      name: 'showhy',
      component: () => import('../views/HuiYuan/Showhy.vue'),
    },

  //会员修改
  {
    path: '/fanhy',
    name: 'fanhy',
    component: () => import('../views/HuiYuan/Fan.vue'),
  },
   //等级录入
   {
    path: '/adddj',
    name: 'adddj',
    component: () => import('../views/DengJi/Adddj.vue'),
  },

   //权益录入
   {
    path: '/addqy',
    name: 'addqy',
    component: () => import('../views/QuanYi/AddQy.vue'),
  },

    //权益反填
    {
      path: '/fanqy',
      name: 'fanqy',
      component: () => import('../views/QuanYi/FanQy.vue'),
    },

  ],
})

export default router
